home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
s-gikan2.maizuru-ct.ac.jp
/
s-gikan2.maizuru-ct.ac.jp.zip
/
s-gikan2.maizuru-ct.ac.jp
/
pub
/
old
/
ncvc350_install.exe
/
{app}
/
scripts
/
add_point.pl
< prev
next >
Wrap
Perl Script
|
2004-04-02
|
823b
|
32 lines
#! /usr/bin/perl
# É▌ÆΦé╡é╜ò╢ÄÜâRü[âhé╠ăé╠ÉöÄÜé╔żÉöô_é≡òtë┴é╖éΘâXâNâèâvâg #
# é╜é╛é╡üA0é╔é═òtë┴é╡é╚éó #
# ex.X50 -> X50. , X0 -> X0 #
#####################################################
#żÉöô_é≡òtë┴é╡é╜éóò╢ÄÜâRü[âhé≡ÿAæ▒é┼ôⁿéΩé─é¡é╛é│éó
#ex. XYZIJR
$add_code= 'XYZIJR';
#####################################################
$pre_file= $ARGV[0];
$out_file= $ARGV[1];
open(IN,$pre_file);
open(OUT,">$out_file");
while(<IN>){
if(!/^N?[0-9\s]*[\(\%]/){
$new_line= "";
while(/([$add_code])([\-\d\.]+)/){
($pre_line,$char,$num,$_)= ($`,$1,$2,$');
if($num !~ /\./ and $num != 0){ $num= $num."\."; }
$new_line= $new_line.$pre_line.$char.$num;
}
$_= $new_line.$_;
}
print OUT;
}
close(OUT);
close(IN);